package com.bstek.bdf2.core;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.argon2.Argon2PasswordEncoder;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.*;
import org.springframework.security.crypto.scrypt.SCryptPasswordEncoder;

import javax.annotation.PostConstruct;


/**
 * @Title: BdfCoreConfiguration
 * @Package: com.bstek.bdf2.core
 * @Description:
 * @Author: zxq
 * @Date: 2023/11/20 - 14:23
 */
@Configuration
public class BDFCoreConfiguration {

//
//    @Bean
//    PasswordEncoder passwordEncoder() {
//        //这个表示使用明文密码
////        return NoOpPasswordEncoder.getInstance();
//        //表示使用 bcrypt 做密码加密
////        return new BCryptPasswordEncoder();
//        String encodingId = "bcrypt";
//        Map<String, PasswordEncoder> encoders = new HashMap();
//        encoders.put(encodingId, new BCryptPasswordEncoder(12));
//        encoders.put("pbkdf2", new Pbkdf2PasswordEncoder());
//        encoders.put("scrypt", new SCryptPasswordEncoder());
//        encoders.put("argon2", new Argon2PasswordEncoder());
//        return new DelegatingPasswordEncoder(encodingId, encoders);
//    }

}
